home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.text;
-
- import java.awt.event.ActionEvent;
-
- class DefaultEditorKit$BeginAction extends TextAction {
- private boolean select;
-
- DefaultEditorKit$BeginAction(String nm, boolean select) {
- super(nm);
- this.select = select;
- }
-
- public void actionPerformed(ActionEvent e) {
- JTextComponent target = ((TextAction)this).getTextComponent(e);
- if (target != null) {
- if (this.select) {
- target.moveCaretPosition(0);
- } else {
- target.setCaretPosition(0);
- }
- }
-
- }
- }
-